﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="News.ascx.cs" Inherits="controls_front_news" %>

  <div class="featurebox_side">
  <div class="more"><a id="A5" href="~/BasicPage/NewsList.aspx" runat="server"><img id="Img2" src="~/images/but_more.gif" alt="更多" width="35" height="25" border="0" runat="server"/></a></div>

	<ul>
        <asp:Repeater ID="newsList" runat="server"  DataSourceID = "SqlDataSource1">
            <ItemTemplate>
                <li class = "right_side_ul">
                    <asp:HyperLink NavigateUrl='<%# "~/BasicPage/newsContent.aspx?id="+Eval("NewsID")%>' runat="server" ID="newsLink" 
                        ToolTip='<%#"新闻标题：" + Eval("Title") + "\n更新时间：" + Eval("CreateDate")%>' Target="_blank">
                        <span class="cyan">[<%# Eval("CreateDate", "{0:MM/dd}")%>]</span>&nbsp;<%# SalePartial.Utility.Utils.StringTruncate(Eval("Title").ToString(), 10, "...")%>
                    </asp:HyperLink>
                </li>
            </ItemTemplate>
        </asp:Repeater>	
	</ul>
  </div>

   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XunPanConnectionString %>"
        SelectCommand="SELECT TOP 10 NewsID,Title,CreateDate FROM [XPNews]  ORDER BY  CreateDate DESC" >
    </asp:SqlDataSource>